	$(document).ready(function(){
		$(".main_intro").find("#button").click(function(){
										if(!$(".main_intro").find("#main_content").hasClass("intro_current")){
											$(".main_intro").find("#main_content").addClass("intro_current");
											$(".main_intro").find("#button").removeClass("down").addClass("up");
										}else{				
											$(".main_intro").find("#main_content").removeClass("intro_current");
											$(".main_intro").find("#button").removeClass("up").addClass("down");
										}
									});
								});
								
	var explorer = window.navigator.userAgent ;
									if((explorer.indexOf("MSIE") >= 0)){
										var width = $("#slider").find("img").width();
										var height = $("#slider").find("img").height();
										
										if(width/height > 1){
											img_width = 480;
											img_height = 480*parseInt(height)/parseInt(width);									
											$("#slider").find("img").attr("width",img_width);
											$("#slider").find("img").attr("height",img_height);
										}else if(width/height <1){
											img_height = 360;
											img_width = 360*parseInt(width)/parseInt(height);									
											$("#slider").find("img").attr("width",img_width);
											$("#slider").find("img").attr("height",img_height);										
										}
										var swidth = (510-parseInt(img_width))/2;
										var sheight = (360-parseInt(img_height))/2;										
										var smargin = sheight+"px "+swidth+"px";
										$("#slider").find(".slider_main").css({"width":img_width,"height":img_height,"margin":smargin});
										$("#slider").find(".slider_main li").css({"width":img_width,"height":img_height,"margin":"0 auto"});
										$(".slider_main").find("img").show();
									}else{
										$(window).load(function(){
											$(".slider_main li").find("img").hide();
											var width = $("#slider").find("img").width();
											var height = $("#slider").find("img").height();
											
											if(width/height > 1){
												img_width = 480;
												img_height = 480*parseInt(height)/parseInt(width);						
												$("#slider").find("img").attr("width",img_width);
												$("#slider").find("img").attr("height",img_height);											
											}else if(width/height <1){
												img_height = 360;
												img_width = 360*parseInt(width)/parseInt(height);						
												$("#slider").find("img").attr("width",img_width);
												$("#slider").find("img").attr("height",img_height);										
											}//error
											
											var swidth = (510-parseInt(img_width))/2;
											var sheight = (360-parseInt(img_height))/2;										
											var smargin = sheight+"px "+swidth+"px";
											$("#slider").find(".slider_main").css({"width":img_width,"height":img_height,"margin":smargin});
											$("#slider").find(".slider_main li").css({"width":img_width,"height":img_height,"margin":"0 auto"});
											$(".slider_main").find("img").show();
										});
									}

									url_id = document.location.search;
									url_id = url_id.replace(/\?id=/,'');
									var count = document.getElementById('slider').getElementsByTagName('li').length;
									var last = parseInt(count)-1;
									$(document).ready(function(){
										$("#slider").find(".slider_pre").click(function(){
											for(i=0;i<count;i++){
												if($(".slider_main").find("li").eq(i).hasClass("selected")){
													var id = $(".slider_main").find("li").eq(i).attr("option-value");
													if(id == 0){
														y =last;
														$(".slider_main").find("li").eq(id).removeClass("selected");
														$(".slider_main").find("li").eq(y).addClass("selected");
														break;
													}else{
														y = parseInt(i)-1;
														$(".slider_main").find("li").eq(i).removeClass("selected");
														$(".slider_main").find("li").eq(y).addClass("selected");
													}
												}
											}
										});
									});
									$(document).ready(function(){
										$("#slider").find(".slider_next").click(function(){
											for(i=0;i<count;i++){
												if($(".slider_main").find("li").eq(i).hasClass("selected")){
													var id = $(".slider_main").find("li").eq(i).attr("option-value");
													if(id == last){
														y = 0;
														$(".slider_main").find("li").eq(id).removeClass("selected");
														$(".slider_main").find("li").eq(y).addClass("selected");														
													}else{
														y = parseInt(id)+1;
														$(".slider_main").find("li").eq(i).removeClass("selected");
														$(".slider_main").find("li").eq(y).addClass("selected");	
														break;													
													}
												}
											}
										});
									});